<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .jinyong{background-color: aquamarine;}
    </style>
    <script src="https://www.helloweba.net/js/jquery.js"></script>
</head>
<body>
    <input type="button" id="send" value="发送500封邮件">
    <script>
        $(function(){
            $('#send').click(function(){
                var that = $(this);
                that.addClass('jinyong').prop('disabled',true);
                $.ajax({
                    type:'GET',
                    url:'handle2.php',
                    success:function(response){
                        if( response.code ){
                            alert(response.message);
                            that.removeClass('jinyong').prop('disabled',false);
                        }
                    }
                });
                
            });


        })
    </script>
</body>
</html>